package com.itheima.lambda.lambdaTest1;

/**
 * @Author 王加鑫
 * @Date 2021/5/9 16:28
 * @Version 1.0
 * lambda表达式
 * 三要素: 要求有一个接口
 *         接口中有且仅有一个抽象方法
 *
 */
public class Test {
    public static void main(String[] args) {

        /*
        Swim swim = new Swimimpl(接口的多态,接口的引用指向实现类的对象)
         */
        Swim swim = (String msg) ->{
            System.out.println("我是lambda表达式"+msg);
        };

        swim.Swimming("msg");

    }
}
